perm filename TRIAL.SAI[L,MRC] blob sn#418147 filedate 1979-02-07 generic text, type C, neo UTF8
COMMENT ⊗   VALID 00002 PAGES
C REC  PAGE   DESCRIPTION
C00001 00001
C00002 00002	begin "score1"
C00004 ENDMK
C⊗;
begin "score1"
 
define ∂ = "comment";

real procedure randreal (real lowest, highest);
  return (ran(0)*(highest-lowest)+lowest);

string newline;
integer i,j;
real beg, freq, spacing;

newline ← "  
"; ∂ carriage return/line feed;

setprint ("TEST.SCR","B"); ∂ output goes to file and screen;

print ("FUNC EXMP1.FUN[INS,MUS];",newline,newline);
print ("PLAY;",newline);

∂ print 10 notes, each .05 seconds long, spaced every .2 seconds,
  each with a random frequency between 110 and 880;

for j ← 1 step 1 until 3 do
begin 
  beg ← 0;
  spacing ← .2;
  for i ← 1 step 1 until 10 do
    begin
    freq ← randreal (110,880);
    print ("SIMP ", beg, .05, freq, 1, " F1 ", 1.0, ";", newline);
    beg ← beg + spacing;
    spacing ← spacing * .8
    end;
end;
print ("FINISH;",newline);
end "score1";